/**
 * keys()
 * values()
 * entries()
 */


for (let index of ['a', 'b'].keys()) {
  console.log('key()');
  console.log(index);     //索引
}
// 0
// 1

for (let elem of ['a', 'b'].values()) {
  console.log('values()');
  console.log(elem);   //值
}
// 'a'
// 'b'

for (let [index, elem] of ['a', 'b'].entries()) {
  console.log('entries()');
  console.log(index, elem);   
}
// 0 "a"
// 1 "b"